From 3c8742561551f4fded9c23c7cdee949794210592 Mon Sep 17 00:00:00 2001 From: Ivan Kanis Date: Mon, 24 Jun 2013 19:38:51 +0200 Subject: [PATCH] * net/eww.el (eww): Add a trailing slash to domain names. --- lisp/ChangeLog | 4 ++++ lisp/net/eww.el | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2d3d28cedc8..10ca2b1cd01 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2013-06-24 Ivan Kanis + + * net/eww.el (eww): Add a trailing slash to domain names. + 2013-06-24 Juanma Barranquero * faces.el (face-spec-recalc): Revert part of revno:113147 (bug#14705). diff --git a/lisp/net/eww.el b/lisp/net/eww.el index 535992513a2..7b37eda185e 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -102,8 +102,12 @@ word(s) will be searched for via `eww-search-prefix'." (interactive "sEnter URL or keywords: ") (if (and (= (length (split-string url)) 1) (> (length (split-string url "\\.")) 1)) - (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url) - (setq url (concat "http://" url))) + (progn + (unless (string-match-p "\\`[a-zA-Z][-a-zA-Z0-9+.]*://" url) + (setq url (concat "http://" url))) + ;; some site don't redirect final / + (when (string= (url-filename (url-generic-parse-url url)) "") + (setq url (concat url "/")))) (unless (string-match-p "^file:" url) (setq url (concat eww-search-prefix (replace-regexp-in-string " " "+" url))))) -- 2.30.2